<template>
	<view class="section-container">
		<view class="top">
			<view class="title">{{ title }}</view>
			<view class="more" @click="handleMore" v-if="showMore">{{moreText}}
				<uni-icons type="forward" color="#999"></uni-icons>
			</view>
		</view>
		<view class="content">
			<slot />
		</view>
	</view>
</template>

<script>
	export default {
		name: 'advice',
		props: {
			title: {
				type: String,
				default: "个人信用产品"
			},
			showMore: {
				type: Boolean,
				default: true
			},
			moreText: {
				type: String,
				default: "更多"
			}
		},
		methods: {
			handleMore() {
				this.$emit("more")
			}
		}

	}
</script>


<style scoped lang="scss">
	.section-container {
		padding: 24rpx;
		border-radius: 12rpx;
		background-color: #fff;
		width: 686rpx;
		margin: 24rpx auto;

		.top {
			height: 44rpx;
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.title {
				color: #333333;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 32rpx;

			}

			.more {
				display: flex;
				align-items: center;
				color: #999;
				font-size: 24rpx;
			}

		}

		.content {
			margin-top: 24rpx;
			min-height: 100rpx;
		}
	}
</style>